(function () {
  'use strict';

  angular
    .module('vboxApp')
    .controller('loginCtrl', loginCtrl);

  /** @ngInject */
  function loginCtrl($scope,$rootScope,$state,authService){
    $rootScope.setting.layout.pageWithoutHeader = true;
    $rootScope.setting.layout.paceTop = true;

    $scope.submitForm = function() {

      authService.login($scope.username,$scope.password).then(function(){
        $state.go('app.dashboard.summary');
      });

    };
  }

})();
